#include "rander.hpp"
#include <random>

rander::rander(int min, int max) {
  this->reset_seed();
  this->set_range(min, max);
}

void rander::set_range(int min, int max) {
  this->dist.param(std::uniform_int_distribution<>::param_type(min, max));
}

void rander::reset_seed() { this->gen.seed(this->rd()); }

int rander::get_rand() { return this->dist(this->gen); }

std::vector<int> rander::get_rand_vector(size_t sz) {
  std::vector<int> res(sz);
  for (auto &item : res) {
    item = get_rand();
  }
  return res;
}